Repository navigation
Reuse copy buffers in OCaml rewatch - #8869
Conversation
Fresh 64 KiB buffers per copied file were the largest single source of allocation in a build. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WZbCuRQ1Tn31bnKzLj5e72 Signed-off-by: Christoph Knittel <ck@cca.io>
dd71607 to
d9d9d32
Compare
rescript
@rescript/belt
@rescript/darwin-arm64
@rescript/darwin-x64
@rescript/linux-arm64
@rescript/linux-x64
@rescript/runtime
@rescript/win32-x64
commit: |
|
Developer playground preview: https://rescript-lang.github.io/rescript/dev-playground/?version=pr-8869 |
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
cristianoc
left a comment
There was a problem hiding this comment.
Fantastic. Should we also explore 0xcaml?
The problem with OxCaml is Windows support. |
OCaml rewatch allocated a fresh 64 KiB buffer for every file it published (
.cmi,.cmj,.cmt, ASTs, sources), and two more for every same-sized.cmiit compared. An allocation profile (Gc.Memprof) of a cleantests/testsbuild showed these buffers as the largest single source of allocation: 17.5% of all words. Blocks that size go straight to the major heap, so they also drive major-GC work, which with several domains stops all of them.Each domain now keeps one copy buffer and one comparison buffer and reuses them.
Clean builds of
tests/testswithoutstring_unicode_test(see #8866), idle Linux VM with 10 cores, median of 7 interleaved runs:🤖 Generated with Claude Code